//package com.qifenqian.turbot.deprecated
//
//import com.qifenqian.turbot.config.Constant
//import com.qifenqian.turbot.module.entity.response.CommentEntity
//import com.qifenqian.turbot.module.entity.response.LoginEntity
//import com.qifenqian.turbot.module.entity.response.StaffEntity
//import com.qifenqian.turbot.module.entity.response.VersionEntity
//import com.qifenqian.turbot.module.entity.response.dish.CategoryEntity
//import com.qifenqian.turbot.module.entity.response.dish.DishEntity
//import com.qifenqian.turbot.module.entity.response.restaurant.*
//import com.qifenqian.turbot.module.entity.response.statistic.SoldDishEntity
//import com.qifenqian.turbot.module.entity.response.statistic.StatisticsEntity
//import com.qifenqian.turbot.net.BaseEntity
//import com.qifenqian.turbot.net.RetrofitFactory
//import io.reactivex.Observable
//import io.reactivex.android.schedulers.AndroidSchedulers
//import io.reactivex.schedulers.Schedulers
//
///**
// * @author H
// * @createDate 2018/8/9 18:02
// * @reference
// * @updateDate
// * @description [TurbotClient]
// * @detail
// * @since
// */
//@Deprecated("TurbotClient")
//class NetClient {
//
//    //-------------------------------登录注册模块---------------------------
//    fun checkVersion(): Observable<BaseEntity<VersionEntity>> {
//        return RetrofitFactory.getRetrofitService(NetService.SettingService::class.java)
//                .checkVersion(platform = 1)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun giveFeedback(content: String): Observable<BaseEntity<Nothing>> {
//        return RetrofitFactory.getRetrofitService(NetService.SettingService::class.java)
//                .giveFeedback(content, Constant.restaurantId)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun sendSmsCode(param: Int): Observable<BaseEntity<Nothing>> {
//        return RetrofitFactory.getRetrofitService(NetService.LoginEtcService::class.java)
//                .sendSmsCode(param)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun login(userCode: String, password: String, loginType: Int, smsCode: String): Observable<BaseEntity<LoginEntity>> {
//        return RetrofitFactory.getRetrofitService(NetService.LoginEtcService::class.java)
//                .login(userCode, password, loginType, smsCode)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun resetPassword(userCode: String, password: String, smsCode: String): Observable<BaseEntity<Any>> {
//        return RetrofitFactory.getRetrofitService(NetService.LoginEtcService::class.java)
//                .resetPassword(userCode, password, smsCode)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun register(userCode: String, smsCode: String, password: String): Observable<BaseEntity<LoginEntity>> {
//        return RetrofitFactory.getRetrofitService(NetService.LoginEtcService::class.java)
//                .register(userCode, smsCode, password)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun qualityCertificationFirst(userCode: String, frontPhotoOfIdCard: String, backPhotoOfIdCard: String, bankNo: String, bankName: String, phone: String, smsCode: String): Observable<BaseEntity<Any>> {
//        return RetrofitFactory.getRetrofitService(NetService.LoginEtcService::class.java)
//                .qualityCertificationFirst(userCode, frontPhotoOfIdCard, backPhotoOfIdCard, bankNo, bankName, phone, smsCode)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun qualityCertificationSecond(userCode: String, businessLicense: String, storePhotos: MutableList<String>, cateringServiceLicense: String): Observable<BaseEntity<Any>> {
//        return RetrofitFactory.getRetrofitService(NetService.LoginEtcService::class.java)
//                .qualityCertificationSecond(userCode, businessLicense, storePhotos, cateringServiceLicense)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun modifyPhone(oldPhone: String, password: String, newPhone: String, smsCode: String): Observable<BaseEntity<Nothing>> {
//        return RetrofitFactory.getRetrofitService(NetService.LoginEtcService::class.java)
//                .modifyPhone(oldPhone, password, newPhone, smsCode)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun modifyPassword(oldPassword: String, newPassword: String): Observable<BaseEntity<Nothing>> {
//        return RetrofitFactory.getRetrofitService(NetService.LoginEtcService::class.java)
//                .modifyPassword(oldPassword, newPassword)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    //-----------------------------餐厅信息模块-------------------
//    fun getRestaurantInfo(restaurantId: String): Observable<BaseEntity<RestaurantEntity>> {
//        return RetrofitFactory.getRetrofitService(NetService.RestaurantService::class.java)
//                .getRestaurantInfo(restaurantId)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun editShortName(restaurantId: String, shortName: String): Observable<BaseEntity<Any>> {
//        return RetrofitFactory.getRetrofitService(NetService.RestaurantService::class.java)
//                .editShortName(restaurantId, shortName)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun getPhotoList(): Observable<BaseEntity<List<RestaurantPhotoEntity>>> {
//        return RetrofitFactory.getRetrofitService(NetService.RestaurantService::class.java)
//                .getPhotoList(Constant.restaurantId)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun savePhotoList(): Observable<BaseEntity<Nothing>> {
//        return RetrofitFactory.getRetrofitService(NetService.RestaurantService::class.java)
//                .savePhotoList()
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun getCuisineList(): Observable<BaseEntity<List<CuisineEntity>>> {
//        return RetrofitFactory.getRetrofitService(NetService.RestaurantService::class.java)
//                .getCuisineList()
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun chooseCuisine(restaurantId: String, cuisine: String): Observable<BaseEntity<Any>> {
//        return RetrofitFactory.getRetrofitService(NetService.RestaurantService::class.java)
//                .chooseCuisine(restaurantId, cuisine)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun setAvailableChooseSeat(restaurantId: String, onlineReservation: Int): Observable<BaseEntity<Any>> {
//        return RetrofitFactory.getRetrofitService(NetService.RestaurantService::class.java)
//                .setAvailableChooseSeat(restaurantId, onlineReservation)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun changeRestaurantPhone(restaurantId: String, restaurantPhone: String): Observable<BaseEntity<Any>> {
//        return RetrofitFactory.getRetrofitService(NetService.RestaurantService::class.java)
//                .changeRestaurantPhone(restaurantId, restaurantPhone)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun changeBusinessTime(restaurantId: String, openTime: String, closeTime: String): Observable<BaseEntity<Any>> {
//        return RetrofitFactory.getRetrofitService(NetService.RestaurantService::class.java)
//                .changeBusinessTime(restaurantId, openTime, closeTime)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun changeAddress(restaurantId: String, address: String): Observable<BaseEntity<Any>> {
//        return RetrofitFactory.getRetrofitService(NetService.RestaurantService::class.java)
//                .changeAddress(restaurantId, address)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun changePersonConsume(restaurantId: String, consumePerPerson: Int): Observable<BaseEntity<Any>> {
//        return RetrofitFactory.getRetrofitService(NetService.RestaurantService::class.java)
//                .changePersonConsume(restaurantId, consumePerPerson)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun getRestaurantIntroduction(restaurantId: String): Observable<BaseEntity<RestaurantEntity>> {
//        return RetrofitFactory.getRetrofitService(NetService.RestaurantService::class.java)
//                .getRestaurantIntroduction(restaurantId)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun changeRestaurantIntroduction(restaurantId: String, introduction: String): Observable<BaseEntity<Any>> {
//        return RetrofitFactory.getRetrofitService(NetService.RestaurantService::class.java)
//                .changeRestaurantIntroduction(restaurantId, introduction)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    //----------------------------服务模块------------------------
//    fun getServiceList(restaurantId: String): Observable<BaseEntity<List<RestaurantServiceEntity>>> {
//        return RetrofitFactory.getRetrofitService(NetService.RestaurantService::class.java)
//                .getServiceList(restaurantId)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun addService(restaurantId: String, serviceName: String): Observable<BaseEntity<RestaurantServiceEntity>> {
//        return RetrofitFactory.getRetrofitService(NetService.RestaurantService::class.java)
//                .addService(restaurantId, serviceName)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//
//    }
//
//    fun deleteService(id: Int): Observable<BaseEntity<Any>> {
//        return RetrofitFactory.getRetrofitService(NetService.RestaurantService::class.java)
//                .deleteService(id)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    /**
//     * TODO: 2018/12/26 9:42 修改传递的参数 ----->
//     */
//    fun chooseService(restaurantId: String = Constant.restaurantId): Observable<BaseEntity<RestaurantServiceEntity>> {
//        return RetrofitFactory.getRetrofitService(NetService.RestaurantService::class.java)
//                .chooseService(restaurantId)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    //-----------------------------餐桌模块------------------------
//    fun getTableInfo(restaurantId: String): Observable<BaseEntity<RestaurantTableEntity>> {
//        return RetrofitFactory.getRetrofitService(NetService.RestaurantService::class.java)
//                .getTableInfo(restaurantId)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    /**
//     * TODO: 2018/12/27 9:42 修改传递的参数 ----->
//     */
//    fun saveTableInfo(restaurantId: String = Constant.restaurantId): Observable<BaseEntity<Nothing>> {
//        return RetrofitFactory.getRetrofitService(NetService.RestaurantService::class.java)
//                .saveTableInfo(restaurantId)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    //-----------------------------职员模块------------------------
//    fun getStaffList(restaurantId: String = Constant.restaurantId): Observable<BaseEntity<List<StaffEntity>>> {
//        return RetrofitFactory.getRetrofitService(NetService.StaffService::class.java)
//                .getStaffList(restaurantId)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun addStaff(staffName: String, staffPhone: String, restaurantId: String = Constant.restaurantId): Observable<BaseEntity<List<StaffEntity>>> {
//        return RetrofitFactory.getRetrofitService(NetService.StaffService::class.java)
//                .addStaff(restaurantId, staffName, staffPhone)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//
//    }
//
//    fun editStaff(staffId: String, staffName: String, staffPhone: String): Observable<BaseEntity<Nothing>> {
//        return RetrofitFactory.getRetrofitService(NetService.StaffService::class.java)
//                .editStaff(staffId, staffName, staffPhone)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun deleteStaff(staffId: String): Observable<BaseEntity<Nothing>> {
//        return RetrofitFactory.getRetrofitService(NetService.StaffService::class.java)
//                .deleteStaff(staffId)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    //-----------------------------用户评论模块------------------------
//    fun getCommentList(page: Int, restaurantId: String = Constant.restaurantId): Observable<BaseEntity<List<CommentEntity>>> {
//        return RetrofitFactory.getRetrofitService(NetService.CommentService::class.java)
//                .getCommentList(page, restaurantId)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun reply(commentId: Int, replyContent: String, replyUserCode: String): Observable<BaseEntity<Nothing>> {
//        return RetrofitFactory.getRetrofitService(NetService.CommentService::class.java)
//                .reply(commentId, replyContent, replyUserCode)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    //-----------------------------菜品模块------------------------
//    fun getCategoryList(restaurantId: String = Constant.restaurantId): Observable<BaseEntity<List<CategoryEntity>>> {
//        return RetrofitFactory.getRetrofitService(NetService.DishService::class.java)
//                .getCategoryList(restaurantId)
//
//    }
//
//    fun getAllDishList(restaurantId: String = Constant.restaurantId): Observable<BaseEntity<List<DishEntity>>> {
//        return RetrofitFactory.getRetrofitService(NetService.DishService::class.java)
//                .getAllDishList(restaurantId)
//    }
//
//    fun addCategory(dishTypeName: String, restaurantId: String = Constant.restaurantId): Observable<BaseEntity<CategoryEntity>> {
//        return RetrofitFactory.getRetrofitService(NetService.DishService::class.java)
//                .addCategory(dishTypeName, restaurantId)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    // TODO: 2018/12/27 18:49 参数需要修改 ----->
//    fun addDish(dishName: String, restaurantId: String = Constant.restaurantId): Observable<BaseEntity<DishEntity>> {
//        return RetrofitFactory.getRetrofitService(NetService.DishService::class.java)
//                .addDish(dishName, restaurantId)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun editCategory(dishName: String, id: Int): Observable<BaseEntity<Nothing>> {
//        return RetrofitFactory.getRetrofitService(NetService.DishService::class.java)
//                .editCategory(dishName, id)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun deleteCategory(id: Int): Observable<BaseEntity<Nothing>> {
//        return RetrofitFactory.getRetrofitService(NetService.DishService::class.java)
//                .deleteCategory(id)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun saveCategory(): Observable<BaseEntity<Nothing>> {
//        return RetrofitFactory.getRetrofitService(NetService.DishService::class.java)
//                .saveCategory()
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    //----------------------------首页统计数据模块------------------------
//    fun getBusinessStatistics(date: String, type: Int, userCode: String = Constant.userCode): Observable<BaseEntity<StatisticsEntity>> {
//        return RetrofitFactory.getRetrofitService(NetService.StatisticsService::class.java)
//                .getBusinessStatistics(userCode, date, type)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//    fun getDishStatistics(date: String, type: Int, userCode: String = Constant.userCode): Observable<BaseEntity<List<SoldDishEntity>>> {
//        return RetrofitFactory.getRetrofitService(NetService.StatisticsService::class.java)
//                .getDishStatistics(userCode, date, type)
//                .subscribeOn(Schedulers.io())
//                .observeOn(AndroidSchedulers.mainThread())
//    }
//
//}